3.5.35 \(\int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx\) [435]

Optimal. Leaf size=233 \[ \frac {3}{8} a^2 (2 c+d) \left (2 c^2+3 c d+2 d^2\right ) x+\frac {a^2 \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}+\frac {a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \cos (e+f x) \sin (e+f x)}{40 f}+\frac {a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac {a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f} \]

[Out]

3/8*a^2*(2*c+d)*(2*c^2+3*c*d+2*d^2)*x+1/10*a^2*(c^4-10*c^3*d-44*c^2*d^2-40*c*d^3-12*d^4)*cos(f*x+e)/d/f+1/40*a
^2*(2*c^3-20*c^2*d-57*c*d^2-30*d^3)*cos(f*x+e)*sin(f*x+e)/f+1/20*a^2*(c^2-10*c*d-12*d^2)*cos(f*x+e)*(c+d*sin(f
*x+e))^2/d/f+1/20*a^2*(c-10*d)*cos(f*x+e)*(c+d*sin(f*x+e))^3/d/f-1/5*a^2*cos(f*x+e)*(c+d*sin(f*x+e))^4/d/f

________________________________________________________________________________________

Rubi [A]
time = 0.22, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2842, 2832, 2813} \begin {gather*} \frac {a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac {3}{8} a^2 x (2 c+d) \left (2 c^2+3 c d+2 d^2\right )+\frac {a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \sin (e+f x) \cos (e+f x)}{40 f}+\frac {a^2 \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

(3*a^2*(2*c + d)*(2*c^2 + 3*c*d + 2*d^2)*x)/8 + (a^2*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4)*Cos[e +
 f*x])/(10*d*f) + (a^2*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3)*Cos[e + f*x]*Sin[e + f*x])/(40*f) + (a^2*(c^2 -
10*c*d - 12*d^2)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(20*d*f) + (a^2*(c - 10*d)*Cos[e + f*x]*(c + d*Sin[e + f
*x])^3)/(20*d*f) - (a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*d*f)

Rule 2813

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(2*a*c +
 b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Cos[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2832

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Sim
p[b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2842

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(-b^2)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Dist[1/(
d*(m + n)), Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a*b*c*(m - 2) + b^2*d*(n + 1) + a^2*d
*(m + n) - b*(b*c*(m - 1) - a*d*(3*m + 2*n - 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &
& NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] &&  !LtQ[n, -1] && (IntegersQ[2*m,
2*n] || IntegerQ[m + 1/2] || (IntegerQ[m] && EqQ[c, 0]))

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx &=-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int \left (9 a^2 d-a^2 (c-10 d) \sin (e+f x)\right ) (c+d \sin (e+f x))^3 \, dx}{5 d}\\ &=\frac {a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int (c+d \sin (e+f x))^2 \left (3 a^2 d (11 c+10 d)-3 a^2 \left (c^2-10 c d-12 d^2\right ) \sin (e+f x)\right ) \, dx}{20 d}\\ &=\frac {a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac {a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int (c+d \sin (e+f x)) \left (3 a^2 d \left (31 c^2+50 c d+24 d^2\right )-3 a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \sin (e+f x)\right ) \, dx}{60 d}\\ &=\frac {3}{8} a^2 (2 c+d) \left (2 c^2+3 c d+2 d^2\right ) x+\frac {a^2 \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}+\frac {a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \cos (e+f x) \sin (e+f x)}{40 f}+\frac {a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac {a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.58, size = 188, normalized size = 0.81 \begin {gather*} \frac {(a+a \sin (e+f x))^2 \left (60 (2 c+d) \left (2 c^2+3 c d+2 d^2\right ) (e+f x)-20 \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right ) \cos (e+f x)+10 d (2 c+d) (2 c+3 d) \cos (3 (e+f x))-2 d^3 \cos (5 (e+f x))-40 \left (c^3+6 c^2 d+6 c d^2+2 d^3\right ) \sin (2 (e+f x))+5 d^2 (3 c+2 d) \sin (4 (e+f x))\right )}{160 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

((a + a*Sin[e + f*x])^2*(60*(2*c + d)*(2*c^2 + 3*c*d + 2*d^2)*(e + f*x) - 20*(16*c^3 + 42*c^2*d + 36*c*d^2 + 1
1*d^3)*Cos[e + f*x] + 10*d*(2*c + d)*(2*c + 3*d)*Cos[3*(e + f*x)] - 2*d^3*Cos[5*(e + f*x)] - 40*(c^3 + 6*c^2*d
 + 6*c*d^2 + 2*d^3)*Sin[2*(e + f*x)] + 5*d^2*(3*c + 2*d)*Sin[4*(e + f*x)]))/(160*f*(Cos[(e + f*x)/2] + Sin[(e
+ f*x)/2])^4)

________________________________________________________________________________________

Maple [A]
time = 0.47, size = 329, normalized size = 1.41 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(a^2*c^3*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-a^2*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*a^2*c*d^2*(-1/
4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*a^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(
f*x+e)-2*a^2*c^3*cos(f*x+e)+6*a^2*c^2*d*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-2*a^2*c*d^2*(2+sin(f*x+e)^2
)*cos(f*x+e)+2*a^2*d^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+a^2*c^3*(f*x+e)-3*a^2*c^2
*d*cos(f*x+e)+3*a^2*c*d^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-1/3*a^2*d^3*(2+sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 342, normalized size = 1.47 \begin {gather*} \frac {120 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{3} + 480 \, {\left (f x + e\right )} a^{2} c^{3} + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c^{2} d + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{2} d + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c d^{2} + 45 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c d^{2} + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c d^{2} - 32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a^{2} d^{3} + 160 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} d^{3} + 30 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} d^{3} - 960 \, a^{2} c^{3} \cos \left (f x + e\right ) - 1440 \, a^{2} c^{2} d \cos \left (f x + e\right )}{480 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/480*(120*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^3 + 480*(f*x + e)*a^2*c^3 + 480*(cos(f*x + e)^3 - 3*cos(f*x
+ e))*a^2*c^2*d + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^2*d + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2*c
*d^2 + 45*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*c*d^2 + 360*(2*f*x + 2*e - sin(2*f*x + 2
*e))*a^2*c*d^2 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a^2*d^3 + 160*(cos(f*x + e)^3 - 3
*cos(f*x + e))*a^2*d^3 + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*d^3 - 960*a^2*c^3*cos(
f*x + e) - 1440*a^2*c^2*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 223, normalized size = 0.96 \begin {gather*} -\frac {8 \, a^{2} d^{3} \cos \left (f x + e\right )^{5} - 40 \, {\left (a^{2} c^{2} d + 2 \, a^{2} c d^{2} + a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (4 \, a^{2} c^{3} + 8 \, a^{2} c^{2} d + 7 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} f x + 80 \, {\left (a^{2} c^{3} + 3 \, a^{2} c^{2} d + 3 \, a^{2} c d^{2} + a^{2} d^{3}\right )} \cos \left (f x + e\right ) - 5 \, {\left (2 \, {\left (3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (4 \, a^{2} c^{3} + 24 \, a^{2} c^{2} d + 27 \, a^{2} c d^{2} + 10 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{40 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/40*(8*a^2*d^3*cos(f*x + e)^5 - 40*(a^2*c^2*d + 2*a^2*c*d^2 + a^2*d^3)*cos(f*x + e)^3 - 15*(4*a^2*c^3 + 8*a^
2*c^2*d + 7*a^2*c*d^2 + 2*a^2*d^3)*f*x + 80*(a^2*c^3 + 3*a^2*c^2*d + 3*a^2*c*d^2 + a^2*d^3)*cos(f*x + e) - 5*(
2*(3*a^2*c*d^2 + 2*a^2*d^3)*cos(f*x + e)^3 - (4*a^2*c^3 + 24*a^2*c^2*d + 27*a^2*c*d^2 + 10*a^2*d^3)*cos(f*x +
e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 729 vs. \(2 (218) = 436\).
time = 0.42, size = 729, normalized size = 3.13 \begin {gather*} \begin {cases} \frac {a^{2} c^{3} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c^{3} x \cos ^{2}{\left (e + f x \right )}}{2} + a^{2} c^{3} x - \frac {a^{2} c^{3} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 a^{2} c^{3} \cos {\left (e + f x \right )}}{f} + 3 a^{2} c^{2} d x \sin ^{2}{\left (e + f x \right )} + 3 a^{2} c^{2} d x \cos ^{2}{\left (e + f x \right )} - \frac {3 a^{2} c^{2} d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{2} c^{2} d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a^{2} c^{2} d \cos ^{3}{\left (e + f x \right )}}{f} - \frac {3 a^{2} c^{2} d \cos {\left (e + f x \right )}}{f} + \frac {9 a^{2} c d^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {9 a^{2} c d^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 a^{2} c d^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {9 a^{2} c d^{2} x \cos ^{4}{\left (e + f x \right )}}{8} + \frac {3 a^{2} c d^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {15 a^{2} c d^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {6 a^{2} c d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {9 a^{2} c d^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {3 a^{2} c d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {4 a^{2} c d^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 a^{2} d^{3} x \sin ^{4}{\left (e + f x \right )}}{4} + \frac {3 a^{2} d^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{2} d^{3} x \cos ^{4}{\left (e + f x \right )}}{4} - \frac {a^{2} d^{3} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 a^{2} d^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f} - \frac {4 a^{2} d^{3} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {a^{2} d^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{2} d^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{4 f} - \frac {8 a^{2} d^{3} \cos ^{5}{\left (e + f x \right )}}{15 f} - \frac {2 a^{2} d^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\left (e \right )}\right )^{3} \left (a \sin {\left (e \right )} + a\right )^{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((a**2*c**3*x*sin(e + f*x)**2/2 + a**2*c**3*x*cos(e + f*x)**2/2 + a**2*c**3*x - a**2*c**3*sin(e + f*x
)*cos(e + f*x)/(2*f) - 2*a**2*c**3*cos(e + f*x)/f + 3*a**2*c**2*d*x*sin(e + f*x)**2 + 3*a**2*c**2*d*x*cos(e +
f*x)**2 - 3*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**2*c**2*d*sin(e + f*x)*cos(e + f*x)/f - 2*a**2*c*
*2*d*cos(e + f*x)**3/f - 3*a**2*c**2*d*cos(e + f*x)/f + 9*a**2*c*d**2*x*sin(e + f*x)**4/8 + 9*a**2*c*d**2*x*si
n(e + f*x)**2*cos(e + f*x)**2/4 + 3*a**2*c*d**2*x*sin(e + f*x)**2/2 + 9*a**2*c*d**2*x*cos(e + f*x)**4/8 + 3*a*
*2*c*d**2*x*cos(e + f*x)**2/2 - 15*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 6*a**2*c*d**2*sin(e + f*x)
**2*cos(e + f*x)/f - 9*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 3*a**2*c*d**2*sin(e + f*x)*cos(e + f*x
)/(2*f) - 4*a**2*c*d**2*cos(e + f*x)**3/f + 3*a**2*d**3*x*sin(e + f*x)**4/4 + 3*a**2*d**3*x*sin(e + f*x)**2*co
s(e + f*x)**2/2 + 3*a**2*d**3*x*cos(e + f*x)**4/4 - a**2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*a**2*d**3*sin
(e + f*x)**3*cos(e + f*x)/(4*f) - 4*a**2*d**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - a**2*d**3*sin(e + f*x)**
2*cos(e + f*x)/f - 3*a**2*d**3*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*a**2*d**3*cos(e + f*x)**5/(15*f) - 2*a**
2*d**3*cos(e + f*x)**3/(3*f), Ne(f, 0)), (x*(c + d*sin(e))**3*(a*sin(e) + a)**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 324, normalized size = 1.39 \begin {gather*} -\frac {a^{2} d^{3} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {a^{2} d^{3} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {3 \, a^{2} c d^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} + \frac {1}{8} \, {\left (4 \, a^{2} c^{3} + 24 \, a^{2} c^{2} d + 9 \, a^{2} c d^{2} + 6 \, a^{2} d^{3}\right )} x + \frac {1}{2} \, {\left (2 \, a^{2} c^{3} + 3 \, a^{2} c d^{2}\right )} x + \frac {{\left (12 \, a^{2} c^{2} d + 24 \, a^{2} c d^{2} + 5 \, a^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (16 \, a^{2} c^{3} + 18 \, a^{2} c^{2} d + 36 \, a^{2} c d^{2} + 5 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} - \frac {3 \, {\left (4 \, a^{2} c^{2} d + a^{2} d^{3}\right )} \cos \left (f x + e\right )}{4 \, f} + \frac {{\left (3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {{\left (a^{2} c^{3} + 6 \, a^{2} c^{2} d + 3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/80*a^2*d^3*cos(5*f*x + 5*e)/f + 1/12*a^2*d^3*cos(3*f*x + 3*e)/f - 3/4*a^2*c*d^2*sin(2*f*x + 2*e)/f + 1/8*(4
*a^2*c^3 + 24*a^2*c^2*d + 9*a^2*c*d^2 + 6*a^2*d^3)*x + 1/2*(2*a^2*c^3 + 3*a^2*c*d^2)*x + 1/48*(12*a^2*c^2*d +
24*a^2*c*d^2 + 5*a^2*d^3)*cos(3*f*x + 3*e)/f - 1/8*(16*a^2*c^3 + 18*a^2*c^2*d + 36*a^2*c*d^2 + 5*a^2*d^3)*cos(
f*x + e)/f - 3/4*(4*a^2*c^2*d + a^2*d^3)*cos(f*x + e)/f + 1/32*(3*a^2*c*d^2 + 2*a^2*d^3)*sin(4*f*x + 4*e)/f -
1/4*(a^2*c^3 + 6*a^2*c^2*d + 3*a^2*c*d^2 + 2*a^2*d^3)*sin(2*f*x + 2*e)/f

________________________________________________________________________________________

Mupad [B]
time = 8.42, size = 611, normalized size = 2.62 \begin {gather*} \frac {3\,a^2\,\mathrm {atan}\left (\frac {3\,a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c+d\right )\,\left (2\,c^2+3\,c\,d+2\,d^2\right )}{4\,\left (3\,a^2\,c^3+6\,a^2\,c^2\,d+\frac {21\,a^2\,c\,d^2}{4}+\frac {3\,a^2\,d^3}{2}\right )}\right )\,\left (2\,c+d\right )\,\left (2\,c^2+3\,c\,d+2\,d^2\right )}{4\,f}-\frac {3\,a^2\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )\,\left (4\,c^3+8\,c^2\,d+7\,c\,d^2+2\,d^3\right )}{4\,f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (4\,a^2\,c^3+6\,d\,a^2\,c^2\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (a^2\,c^3+6\,a^2\,c^2\,d+\frac {21\,a^2\,c\,d^2}{4}+\frac {3\,a^2\,d^3}{2}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (2\,a^2\,c^3+12\,a^2\,c^2\,d+\frac {33\,a^2\,c\,d^2}{2}+7\,a^2\,d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (2\,a^2\,c^3+12\,a^2\,c^2\,d+\frac {33\,a^2\,c\,d^2}{2}+7\,a^2\,d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (16\,a^2\,c^3+36\,a^2\,c^2\,d+24\,a^2\,c\,d^2+4\,a^2\,d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (16\,a^2\,c^3+44\,a^2\,c^2\,d+40\,a^2\,c\,d^2+12\,a^2\,d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (24\,a^2\,c^3+64\,a^2\,c^2\,d+56\,a^2\,c\,d^2+20\,a^2\,d^3\right )+4\,a^2\,c^3+\frac {12\,a^2\,d^3}{5}+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (a^2\,c^3+6\,a^2\,c^2\,d+\frac {21\,a^2\,c\,d^2}{4}+\frac {3\,a^2\,d^3}{2}\right )+8\,a^2\,c\,d^2+10\,a^2\,c^2\,d}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))^2*(c + d*sin(e + f*x))^3,x)

[Out]

(3*a^2*atan((3*a^2*tan(e/2 + (f*x)/2)*(2*c + d)*(3*c*d + 2*c^2 + 2*d^2))/(4*(3*a^2*c^3 + (3*a^2*d^3)/2 + (21*a
^2*c*d^2)/4 + 6*a^2*c^2*d)))*(2*c + d)*(3*c*d + 2*c^2 + 2*d^2))/(4*f) - (3*a^2*(atan(tan(e/2 + (f*x)/2)) - (f*
x)/2)*(7*c*d^2 + 8*c^2*d + 4*c^3 + 2*d^3))/(4*f) - (tan(e/2 + (f*x)/2)^8*(4*a^2*c^3 + 6*a^2*c^2*d) - tan(e/2 +
 (f*x)/2)^9*(a^2*c^3 + (3*a^2*d^3)/2 + (21*a^2*c*d^2)/4 + 6*a^2*c^2*d) + tan(e/2 + (f*x)/2)^3*(2*a^2*c^3 + 7*a
^2*d^3 + (33*a^2*c*d^2)/2 + 12*a^2*c^2*d) - tan(e/2 + (f*x)/2)^7*(2*a^2*c^3 + 7*a^2*d^3 + (33*a^2*c*d^2)/2 + 1
2*a^2*c^2*d) + tan(e/2 + (f*x)/2)^6*(16*a^2*c^3 + 4*a^2*d^3 + 24*a^2*c*d^2 + 36*a^2*c^2*d) + tan(e/2 + (f*x)/2
)^2*(16*a^2*c^3 + 12*a^2*d^3 + 40*a^2*c*d^2 + 44*a^2*c^2*d) + tan(e/2 + (f*x)/2)^4*(24*a^2*c^3 + 20*a^2*d^3 +
56*a^2*c*d^2 + 64*a^2*c^2*d) + 4*a^2*c^3 + (12*a^2*d^3)/5 + tan(e/2 + (f*x)/2)*(a^2*c^3 + (3*a^2*d^3)/2 + (21*
a^2*c*d^2)/4 + 6*a^2*c^2*d) + 8*a^2*c*d^2 + 10*a^2*c^2*d)/(f*(5*tan(e/2 + (f*x)/2)^2 + 10*tan(e/2 + (f*x)/2)^4
 + 10*tan(e/2 + (f*x)/2)^6 + 5*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 + 1))

________________________________________________________________________________________